<cfparam name="url.hash" type="string" />

<cfif StructKeyExists(url, "type") AND url.type EQ "stream">
	<cfset variables.captcha = application.stplugins.modcaptcha.lyla.createCaptchaFromHashReference(type="stream", hash=url.hash) />
	<cfcontent type="image/jpg" variable="#variables.captcha.stream#" reset="false" />

<cfelseif StructKeyExists(url, "type") AND url.type EQ "file">
	<cfset variables.captcha = application.stplugins.modcaptcha.lyla.createCaptchaFromHashReference(type="file", hash=url.hash) />
	<cfcontent type="image/jpg" file="#variables.captcha.fileLocation#" deletefile="true" reset="false" />

<cfelse>
	<p>Please nominate a Captcha stream type:</p>
	<ul>
		<li>Stream (Only works on CFMX 7)</li>
		<li>File</li>
	</ul>
</cfif>